package com.storeapp.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.storeapp.dao.IncomePerDayDao;
import com.storeapp.entity.domain.IncomePerDay;

@Component
@Transactional
public class IncomePerDayService {
	@Autowired
	private IncomePerDayDao incomePerDayDao;
	
	@Transactional(readOnly = true)
	public IncomePerDay getProduct(Long id) {
		return incomePerDayDao.get(id);
	}

	public void saveOrUpdateProduct(IncomePerDay entity) {
		incomePerDayDao.save(entity);
	}
	
	public void deleteProduct(IncomePerDay entity) {
		incomePerDayDao.delete(entity);
	}

	public List<IncomePerDay> listAll() {
		return incomePerDayDao.getAll();
	}
}
